/*
XPTracker - Alternative Agile Tracking Tool
Copyright (C) 2006-2009  Stephen Starkey

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
*/
package org.xptracker.port;

import org.xptracker.domain.Story;
import org.xptracker.domain.User;

import java.util.HashMap;
import java.util.Map;

public class PortableFields {
  public static Map<String, SimpleType<Story>> makeStoryFields() {
    Map<String, SimpleType<Story>> storyFields = new HashMap<String, SimpleType<Story>>();
    storyFields.put("summary", new SimpleType<Story>("summary"));
    storyFields.put("description", new SimpleType<Story>("description"));
    storyFields.put("completedDate", new DateType<Story>("completedDate"));
    storyFields.put("dueDate", new DateType<Story>("dueDate"));
    storyFields.put("lastModified", new DateType<Story>("lastModified"));
    storyFields.put("severity", new SeverityType<Story>("severity"));
    storyFields.put("size", new SizeType<Story>("size"));
    storyFields.put("estimate", new DoubleType<Story>("estimate"));
    storyFields.put("creator", new UserType<Story>("creator"));
    storyFields.put("categories", new StoryCategoriesType<Story>("categories"));
    storyFields.put("state", new StateType<Story>("state"));
    storyFields.put("queue", new StoryQueueType<Story>("queue"));
    storyFields.put("customers", new StoryCustomersType<Story>("customers"));
    return storyFields;
  }

  public static Map<String, SimpleType<User>> makeUserFields() {
    Map<String, SimpleType<User>> userFields = new HashMap<String, SimpleType<User>>();
    userFields.put("username", new SimpleType<User>("username"));
    userFields.put("fullName", new SimpleType<User>("fullName"));
    userFields.put("email", new SimpleType<User>("email"));
    userFields.put("phoneNumber", new SimpleType<User>("phoneNumber"));
    userFields.put("enabled", new BooleanType());
    return userFields;
  }

  public static final String CUSTOMER_NAME = "customer";
}
